#ifndef CONNECTION_SERIALIZATION_HELPER
#define CONNECTION_SERIALIZATION_HELPER

#include <iserializable.h>

#include <QtCore/QUuid>

namespace core
{
class ConnectionData;
}

namespace swp
{
class GraphicData;

class ConnectionSerializationHelper : public core::ISerializable
{
public:
    ConnectionSerializationHelper(GraphicData* data,
        const core::ConnectionData* connection);
    ~ConnectionSerializationHelper();

    // ISerializable
    bool doActionForProperty(const QString& property,
        const QVariantList& value, const core::SerializationEngine& helper);
    void deserializationFinished(bool ok);
    QHash<QString, QVariantList> serializationData(
        const core::SerializationEngine& helper) const;

private:
    GraphicData* m_data;
    const core::ConnectionData* m_connection;
    unsigned int m_connectionId;
    QUuid m_connector;
    QUuid m_from;
    QUuid m_to;
};

} // namespace swp

#endif
